home *** CD-ROM | disk | FTP | other *** search
- /* viedo3.c - char output calls for Video_IO */
- /* note that vid_wca() and vid_gca() do not advance cursor */
-
- #include "stdio.h"
- #include "cminor.h"
- #include "asmtools.h"
- #include "keyio.h"
- #include "video.h"
-
- int vid_wca(c,a) /* display char and attribute */
- int c ; /* char to display */
- int a ; /* attribute */
- {
- REGS sreg , dreg ;
-
- sreg.bx = a & 0xff ;
- sreg.ax = c & 0xff ;
- sreg.cx = 1 ; /* count of chars to display = 1 */
- vidint(V_WCA,&sreg,&dreg) ;
- }
-
- int vid_gca(pc,pa) /* get char and attribute at cursor */
- char *pc ; /* store character here */
- char *pa ; /* store attribute here */
- {
- REGS sreg , dreg ;
-
- sreg.bx = 0 ;
- vidint(V_CGA,&sreg,&dreg) ;
- *pc = ( (BYTE_REGS *) &dreg) -> al ;
- *pa = ( (BYTE_REGS *) &dreg) -> ah ;
- }
-
- int vid_tc(c) /* output one char with TTY write */
- int c ; /* char to write */
- {
- REGS sreg , dreg ;
-
- sreg.bx = 0 ;
- sreg.ax = c & 0xff ;
- vidint(V_WTTY,&sreg,&dreg) ; /* write char & advance cur. */
- }